package org.arch_learn.dubbo_demo.service_consumer.service;

import org.apache.dubbo.config.annotation.Reference;
import org.arch_learn.dubbo_demo.api.DemoService;
import org.springframework.stereotype.Component;

@Component
public class DemoServiceConsumer {
    @Reference
    private DemoService demoService;

    public void callMethod(String methodName) {
        switch (methodName) {
            case "methodA" :
                demoService.methodA();
                break;
            case "methodB" :
                demoService.methodB();
                break;
            case "methodC" :
                demoService.methodC();
                break;
        }
    }
}
